class PhoneUser < ActiveRecord::Base
	has_many :children_phone_users
	has_many :children, through: :children_phone_users

#def generate_api_key
#	loop do
#		token = SecureRandom.base64.tr( '+/=' , 'Qrt' )
#		break token unless PhoneUser.exists?(api_key:token).any?
#	end
#end

#before_create do |doc|
	#doc.api_key = doc.generate_api_key
#end

end